package com.service;

import com.mapper.DocumentInfoMapper;
import com.vo.CollegeCountVo;
import com.vo.DayCollegeCountVo;
import com.vo.DayCountVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DataService {
    @Autowired
    DocumentInfoMapper documentInfoMapper;

    /**
     * 日期分组统计论文数
     */
    public List<DayCountVo> groupByDay(String startTime, String endTime){
        return documentInfoMapper.queryDocumentInfoByDay(startTime, endTime);
    }

    public List<DayCollegeCountVo> groupByDayAndCollege(String startTime, String endTime){
        return documentInfoMapper.queryDocumentInfoByDayAndCollege(startTime, endTime);
    }

    public List<CollegeCountVo> groupByCollege(String startTime, String endTime){
        return documentInfoMapper.queryDocumentInfoByCollege(startTime, endTime);
    }
}
